package chixing.day05;

/**
 * 1. 设计商品类Product ，有属性：商品id,商品名称，商品价格，商品详细描述
 * 2. 商品类的属性 添加赋值与取值（set、get）方法，toString()
 */
public class Product {
    private int ProductId;//商品id
    private String productName;//商品名称
    private double productPrice;//商品价格
    private String productDesc;//商品详细描述

    public Product(){}
    public Product(int productId, String productName, double productPrice, String productDesc) {
        ProductId = productId;
        this.productName = productName;
        this.productPrice = productPrice;
        this.productDesc = productDesc;
    }

    public int getProductId() {
        return ProductId;
    }

    public void setProductId(int productId) {
        ProductId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public double getProductPrice() {
        return productPrice;
    }

    public void setProductPrice(double productPrice) {
        this.productPrice = productPrice;
    }

    public String getProductDesc() {
        return productDesc;
    }

    public void setProductDesc(String productDesc) {
        this.productDesc = productDesc;
    }

    @Override
    public String toString() {
        return "Product{" +
                "ProductId=" + ProductId +
                ", productName='" + productName + '\'' +
                ", productPrice=" + productPrice +
                ", productDesc='" + productDesc + '\'' +
                '}';
    }
}
